﻿@model LayuiMvc.DataModel.Identity.UserMsgModel

<div class="fly-header layui-bg-black">
    <div class="layui-container">
        <!--Logo放置区-->
        <a href="/" class="fly-logo">
            <img src="~/Content/image/logo.png"  />
        </a>
        <!--右侧用户登录区域-->
        <ul class="layui-nav fly-nav-user">

            <!--判断用户登录状态-->
            @if (!Model.IsLogin)
            {
                <li class="layui-nav-item">
                    <a href="@Url.Action("Login","Account")">登录</a>
                </li>
                <li class="layui-nav-item">
                    <a href="@Url.Action("Register","Account")">注册</a>
                </li>
            }
            else
            {
                <li class="layui-nav-item" lay-lay-unselect>
                    <a href="javascript:;" class="fly-nav-avatar">
                        <cite>@Model.NickName</cite>
                        @if (Model.IsApprove)
	                    {
                             <i class="iconfont icon-renzheng" title="认证信息：@(Model.ApproveMsg)"></i>
	                    }
                        <i class="layui-badge fly-badge-vip">@Model.UserIdentityStr</i> 
                        <img src="@(string.IsNullOrEmpty(Model.HeadImgUrl)?"/Content/image/headimg.jpg":Model.HeadImgUrl)"  />
                    </a>

                    <dl class="layui-nav-child">
                        <dd>
                            <a href="@Url.Action("UserSet","Account")">
                                <i class="layui-icon layui-icon-set"></i> 基本设置
                            </a>
                            <a href="@Url.Action("UserCenter","User",new {userId=Model.UserId })">
                                <i class="layui-icon layui-icon-user"></i>个人中心
                            </a>
                            <a href="/">
                                <i class="layui-icon layui-icon-username"></i>我的主页
                            </a>
                           <hr />
                           <a href="@Url.Action("SignOut","Account")">
                               <i class="layui-icon layui-icon-release"></i> 退出登录
                           </a>
                        </dd>
                    </dl>
                </li>
            }

        </ul>
    </div>
</div>